home *** CD-ROM | disk | FTP | other *** search
-
- -- scripts for unit section
- function units_cityflag_setup()
- local flag = uniGetExecutor()
- flag:setTransformOwner(units_findfreefirespot(uniGetTarget(),2))
- flag:setLocalPosition(0,0,0)
- end
-
- function units_cityflag_rise()
- local flag = uniGetExecutor()
- flag:addAnimationToQueue(ENAT_FIRE1,1)
- flag:addAnimationToQueue(ENAT_AFTERFIRE1,MATH_INFINITY)
- pause(0.7)
- units_cityflag_destroyed()
- end
-
- function units_cityflag_down()
- local flag = uniGetExecutor()
- flag:setCurrentAnimationRepeatCount(1)
- flag:addAnimationToQueue(ENAT_FIRE2,1)
- end
-
- function units_cityflag_destroyed()
- -- uniGetExecutor():addSimpleEffect(ENET_EFFECT_PS_AMBRELLAEXPLOSION):suspendedDestroy(1.2)
- end
-
- -- register unit section
- registerCommand(ENSCRIPTSET_CITYFLAG,ENC_FIRE1,"units_cityflag_rise")
- registerCommand(ENSCRIPTSET_CITYFLAG,ENC_FIRE2,"units_cityflag_down")
- registerCommand(ENSCRIPTSET_CITYFLAG,ENC_SETUP,"units_cityflag_setup")
- registerCommand(ENSCRIPTSET_CITYFLAG,ENC_RESETUP,"units_cityflag_setup")
- registerCommand(ENSCRIPTSET_CITYFLAG,ENC_EXPLODE,"units_cityflag_destroyed")
-
- -- make description of red flag
- desc = getEffectDescription(ENET_UNIT_GUARDTOWER_ALIEN)
- desc.FileName = "city_flag_red.rmd"
- desc.ScriptSet = ENSCRIPTSET_CITYFLAG
- desc.MoveType = ENMOVE_NOTALLOWED
- desc.Material = ENMAT_STATICMESH_TWOSIDE
- changeEffect(ENET_UNIT_CITYFLAG_RED,desc)
-
- -- make description of green flag
- desc = getEffectDescription(ENET_UNIT_GUARDTOWER_ALIEN)
- desc.FileName = "city_flag_green.rmd"
- desc.ScriptSet = ENSCRIPTSET_CITYFLAG
- desc.MoveType = ENMOVE_NOTALLOWED
- desc.Material = ENMAT_STATICMESH_TWOSIDE
- changeEffect(ENET_UNIT_CITYFLAG_GREEN,desc)
-